Getting Clean via Emergent Design
simple design…
- runs all tests
- contains no duplication
- expresses intent of the programmer
- minimizes number of classes and methods
Simple Design Rule 1: Runs All the Tests
The more testable a system is, the better; SRP facilitates this.
Simple Design Rules 2-4: Refactoring
With tests, you can safely refactor
No Duplication
DRYing even small sections of code can reveal violations of SRP
Expressive
- good names
- small classes/functions
- standardized nomenclature
- unit testing
Minimal Classes and Methods
avoid pointless dogmatism